﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{

    class Square : Shape
    {
        private int sidelen;

        public int Sidelen
        {
            get { return this.sidelen; }
            set { this.sidelen = value; }
        }
        public override void GetArea()
        {
            Console.WriteLine("请输入正方形的边长");
            this.Sidelen = int.Parse(Console.ReadLine());
            Console.WriteLine("该正方形的面积为{0}", this.Sidelen * this.Sidelen);

        }

    }
}
